package ar.org.cfired.creditos.servlets;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.*;
import javax.servlet.http.*;

import ar.org.cfired.creditos.Importes;

public class ServletImportes extends HttpServlet {

	private static final long serialVersionUID = 1L;

	public void service(HttpServletRequest req, HttpServletResponse res)
			throws ServletException, IOException {

		System.out.println("ENTRO EN EL SERVLET: ServletImportes");
		String monto = req.getParameter("monto");

		String montoLetras = Importes.toText(monto, false);

		res.setContentType("text/html;charset=UTF-8");
		PrintWriter out = res.getWriter();
		try {
			out.println(montoLetras);
		} finally {
			out.close();
		}
	}
}
